home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
datatypes
/
sun.datatype
/
sun.datatype.guide
(
.txt
)
< prev
next >
Wrap
Amigaguide Document
|
1996-04-07
|
10KB
|
196 lines
@DATABASE "sun.datatype.guide"
@$VER: sun.datatype.guide 39.6 (22.1.95)
@AUTHOR "Arthur Pijpers"
@NODE Main "sun.datatype Documentation"
@{B}Table of Contents@{UB}
@{" Introduction " link Introduction}
@{" Requirements " link Requirements}
@{" How to Install " link Installation}
@{" What is a Sun Raster file ? " link Sun }
@{" What is a datatype? " link Datatypes}
@{" Implementation Details (Release Notes) " link Implementation}
@{" Revision history " link History}
@{" Acknowledgements " link Acknowledgements}
@{" Author " link Author}
@ENDNODE
@NODE Introduction
@{B}Introduction@{UB}
This is V39.6 of the @{"Sun" link Sun} @{"datatype" link Datatypes}. The version information can be verified
by using the AmigaDOS @{B}version@{UB} command on the datatype file
SYS:classes/datatypes/sun.datatype after installation.
Once installed, the Sun datatype means that any datatype-aware programs can
read @{"Sun Raster" link Sun} image files.
Examples of this are that a Sun image can be used as a Workbench screen
backdrop, and Multiview can be used to display them.
The Sun datatype is freely distributable, but you may not charge for it,
other than for reasonable media and distribution costs such as those charged
by Fred Fish and other reputable PD libraries.
The Sun datatype can be distributed as part of a datatype collection, but
then you have to supply both the 68000 and the 68020 version.
@ENDNODE
@NODE Requirements
@{B}Requirements@{UB}
Datatypes were introduced with Workbench 3.0, so the main requirement is
that you have this version of the OS. Presumably, any future versions of the
OS will also support them.
Do not try to install the datatype if you are using an OS older than 3.0
(i.e. 1.3, 2.04, or 2.1). The correct directories do not exist, and nothing
will work even if you create them. I'm afraid you'll have to find some
other program to view your @{"Sun Raster" link Sun} files with.
When you use the datatype on a computer without the AGA chipset, then
pictures with more than 16 colours hires or 32 colours lores are
automatically dithered to the maximum number of available colours, unless
you have a graphical card added.
24 Bit pictures need AGA chips (or AGA-emulation) to be displayed correctly.
@ENDNODE
@NODE Installation
@{B}How to Install@{UB}
Installation can be done in one of two ways:
1) Using Installer
2) Manual Installation
If you have a copy of Installer, you can simply double click on the
sun.datatype.install icon and follow the onscreen instructions. The
Installer script follows the manual sequence below, so you are advised to
read it quickly so that you know what to expect.
If you do not have Installer, (which is strange, because you have
Workbench 3), then follow the procedure below:
1) Copy the file sun.datatype.68000 or sun.datatype.68020 to the directory
SYS:classes/datatypes and rename it to sun.datatype (SYS: is a logical name
for the disk you boot from). You can perform the copy either from the
Workbench or the Shell. Use the 68020 version only on Amigas with a 68020
processor or higher.
2) Decide whether you want the datatype to be permanently enabled, or
manually run whenever you want to use it. Proceed to step 3 for a
permanently enabled installation, otherwise proceed to step 4.
3) Copy the file "Sun Raster" to the directory DEVS:Datatypes (DEVS: is a
logical directory on the disk you boot from. It is the same as the DEVS
drawer on the boot disk). If using the Shell, you will also have to
manually copy the icon file "Sun Raster.info". When you reboot your system,
the Sun datatype will be avaliable for use.
4) Copy the file "Sun Raster" to the directory SYS:Storage/Datatypes. If
using the Shell, you will also have to manually copy the icon file
"Sun Raster.info".
The Sun datatype will not be available until you double click on the
"Sun Raster" icon, at which point it will remain installed until a reboot.
If you already had an older version of the sun.datatype, then you can remove
the files Sun and Sun.info from the DEVS:DataTypes directory.
This completes installation.
@ENDNODE
@NODE Sun
@{B}What is a Sun Raster file ?@{UB}
A Sun Raster file is a file of an image, used on Sun computers. The files
can be compressed or uncompressed, just like IFF ILBM files. It looks much
like an IFF file, but compression is a little different and also less
efficient than IFF compression.
@ENDNODE
@NODE Datatypes
@{B}What is a Datatype?@{UB}
Datatypes were introduced with Workbench 3.0, and provide a way for
applications to read data files without having to learn all the messy
details about how the data in the files are stored.
As an example, consider storing pictures on computer. As Amiga owners, we
are relatively lucky in that all images are stored using the IFF ILBM
format. Other computers have a bewildering array of incompatible formats,
and there exist commercial packages with the sole purpose of converting
images between them.
If I wanted to write a paint program, it would certainly be more useful if
it could read and maybe write out images in some of these other formats.
However, implementing such feature would be a bit of a nightmare, as I would
have to obtain the specifications of these formats, plus some test images,
and write (and support) a significant amount of code to read and write these
various formats.
A datatype is a little program that performs this conversion for me, and
completely hides all the messy implementation details about what file
headers exist, how they are structured, etc. My application can open the
datatypes library, pass a file to it and ask if it recognises the format.
The datatypes library has a look at the file, and then consults its list of
installed datatypes to see if any of them recognise it. It then comes back
to the application with a reply saying "Yup, its a Sun picture".
My application can then ask for the data to be read in, and after a short
while the library will return the information in an Amiga standard format,
in this case, an IFF image. Of course, someone has to write the datatype,
but once written and installed, any other program that uses datatypes can
take advantage of it at no extra cost or expense.
This datatype decodes Sun images, and any application that wishes to read
this format of images can do so without having to know anything about them.
@ENDNODE
@NODE Implementation
@{B}Implementation Details (Release Notes)@{UB}
These are the release notes for V39.6 of the Sun datatype.
This implementation will decode @{"Sun Raster" link Sun} files in up to 256 colours.
24 Bit Sun Raster images are converted to HAM8. Only standard and byte-
encoded files are handled. If a colourmap is supplied then it needs to be in
equal RGB format.
If you are using Multiview to display @{"Sun Raster" link Sun} files without
the SCREEN tooltype/parameter, the @{"Sun Raster" link Sun} file will be
displayed in a window on the Workbench, it will be quantised down to however
many colours you have set up on your Workbench screen. 24 Bit pictures are
always shown on a separate HAM8 screen.
If you are using Multiview with the SCREEN tooltype/parameter, the datatype
will choose the screen resolution that it thinks is most appropriate for
displaying the image from the selection available in the display database.
This decision is made using the BestModeID function, and is based on the
size, colour count and aspect ratio of the image. I am not really satisfied
with the results from BestModeID, but I haven't found a better way yet.
When you display a picture of 1152 * 900 * 256 colours, which is a standard
Sun format, then the image doesn't appear when showing on the Workbench
screen. This is a memory problem, that is probably produced by the
picture.datatype. If the picture doesn't appear, then try to display the
picture on a separate screen. This will probably work better.
@ENDNODE
@NODE History
@{B}Revision History@{UB}
Version 39.1 released 11-12-1993
- First release
Version 39.2 released 12-12-1993
- Bug fixed, for colourmaps with less than 2^depth colours.
Version 39.3 released 15-2-1994
- Major bug fix. Compressed pictures using colour 0x80 were displayed
wrong. I finally had some Sun images to test it.
- Removed some unused structure members
- Colourmap reading speed improved
- Used SAS-C V6.51 to compile
- Added 68000 version of the datatype, for people who updated their
Amiga 500, 500+, 600, 2000 or 2500 to Kickstart 3.
Version 39.4 released 13-3-1994
- Uses less memory. If the file can't be read in 1 part, it will be read
in smaller parts, requiring less memory
- NTSC and PAL screens are promoted to DBLNTSC and DBLPAL if available.
BestModeID doesn't seem to do this always
- Added support for 24 bit images. These images are converted to HAM8,
using a standard internal palette. No support for 24 bit cards yet
- Changed the datatype description file from SUN to SUN Raster
- Sources included
Version 39.5 released 6-9-1994
- Bug fixed, black & white pictures were displayed wrong.
- Changed datatype description file from 'SUN Raster' to 'Sun Raster'
to keep the same name convention as the Commodore 'Sun Audio' datatype.
Version 39.6 released 23-1-1995
- Replaced Chunky2planar and RGBtoHAM8 routines by assembler routines, made
by John Hendrikx
@ENDNODE
@NODE Acknowledgements
@{B}Acknowledgements@{UB}
Sun datatype is based on the BMP datatype.
This AmigaGuide
file and the Installer script have been copied from the
JPEG.datatype by Steve Goddard and have been adapted to the Sun datatype.
The code for the 24 bit to HAM8 conversion is based on Display24.c from
Michael Saunby.
Thanks to John Hendrikx (TextDemo/FastView) for the Chunky2planar and
RGBtoHAM8 routines.
Sun datatype was compiled using SAS/C V6.51
@ENDNODE
@NODE Author
@{B}Author@{UB}
Please feel free to contact me at:
Arthur Pijpers
2e Scheepvaartstraat 24
3151 NP Hoek van Holland
Holland
Usenet : arthurp@grafix.xs4all.nl
FidoNet : 2:286/407.37
AMYNet : 39:153/201.37
NLANet : 14:101/200.37
@ENDNODE